package com.example.tests;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;

import org.testng.annotations.Test;

import com.example.fw.Folders;

public class TestFolderRemoval extends TestBase {
	
	@Test
	public void testFolderRemoval() {
		Folders oldFolders = app.getFolderHelper().getFolders();
		int idForDeletion = 1;
		String folderForDeletion = oldFolders.getFolderByID(idForDeletion);
		if(folderForDeletion != "")
		{
			app.getFolderHelper().deleteFolder(idForDeletion);
			Folders newFolders = app.getFolderHelper().getFolders();
			assertThat(oldFolders, equalTo(newFolders.withAddedByIndex(idForDeletion, folderForDeletion)));
		}

	}

}
